<template>
  <div :title="text">
<!--    v-bind的语法糖-->
    <el-button :="$attrs">{{text}}</el-button>
  </div>
</template>

<script setup lang="ts">
import { useAttrs } from "vue";

let $attrs = useAttrs();
console.log($attrs);

//props与useAttrs方法都可以获取父组件传递过来的属性与属性值
//但是props接受了useAttrs方法就获取不到了
let props = defineProps(['text']);
console.log(props);
</script>

<style scoped>

</style>